Skip to content

feat: add feature-lead engine#2

Draft
Copilot wants to merge 4 commits into
mainfrom
copilot/add-feature-lead-engine
Draft

feat: add feature-lead engine#2
Copilot wants to merge 4 commits into
mainfrom
copilot/add-feature-lead-engine

Conversation

Copilot AI commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Adds the feature-lead engine — a two-step agentic workflow invoked by the orchestrator for each FeatureLead it produces. The engine breaks a feature into discrete tasks via a task-breaker agent, then drives a coder agent to implement each task against the feature's resolved contracts.

New types in orchestrator

  • Task — discrete implementable unit (name, description, acceptance criteria, files)
  • CoderOutput — coder agent response tied to a task
  • FeatureLeadResult — aggregated result per lead (tasks + coder outputs)
  • FeatureLeadRunner interface — decouples the orchestrator from the engine implementation; featurelead imports orchestrator, not the reverse

orchestrator.New — functional options (backward-compatible)

// existing callers unchanged; engine wired in optionally
orch := orchestrator.New(client, names, mcpURL, repoPath,
    orchestrator.WithFeatureLeadRunner(flEngine),
)

Result.FeatureLeadResults (omitempty) is populated only when a runner is configured.

New featurelead package

Engine implements FeatureLeadRunner with two steps:

  1. Task breakdown — task-breaker agent decomposes the FeatureLead JSON into []Task
  2. Task implementation — coder agent is invoked once per task, receiving the task spec plus the feature's resolved RequiredContracts and ProvidedContracts

main.go

Two new optional flags — --task-breaker-agent and --coder-agent — must be supplied together. When present, a featurelead.Engine is wired into the orchestrator.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

- Add Task, CoderOutput, FeatureLeadResult types and FeatureLeadRunner
  interface to orchestrator package
- Add Option/WithFeatureLeadRunner functional option to Orchestrator
  (backward-compatible change to New signature)
- Add optional Step 5 in Orchestrator.Run invoking FeatureLeadRunner
  for each FeatureLead; results stored in Result.FeatureLeadResults
- New featurelead package: Engine implements FeatureLeadRunner with a
  two-step workflow (task breakdown + per-task coder agent)
- Tests for featurelead package including orchestrator integration test
- main.go: --task-breaker-agent and --coder-agent flags wire up the
  feature-lead engine when both are supplied

Co-authored-by: iamangus <13301891+iamangus@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feature lead engine for orchestrator integration feat: add feature-lead engine Mar 16, 2026
Copilot AI requested a review from iamangus March 16, 2026 19:33
… code-mcp via HTTP; add monitorOrchBranch background goroutine for PR description updates and promotion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants